package com.wondertek.poms.service.controller;

import com.wondertek.poms.common.log.MethodLog;
import com.wondertek.poms.common.vo.ResultBean;
import com.wondertek.poms.core.service.IClassifyService;
import com.wondertek.poms.dao.po.Classify;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author evan0213
 * @description
 */
@RestController
@RequestMapping("classify")
public class ClassifyController {

	@Autowired
	private IClassifyService classifyService;

	/**
	 * @return 一级分类下拉框列表
	 */
	@GetMapping("/all")
	@MethodLog(module = "一级分类全量")
	public ResultBean all() {
		List<Classify> all = classifyService.findAll();
		return ResultBean.ok(all);
	}

}
